package com.example.d5_synchronized_method;

/**
 * 取钱线程
 */
public class DrawThread extends Thread {
    private Account account;
    private String name;

    public DrawThread(Account account, String name) {
        super(name);
        this.account = account;
    }

    @Override
    public void run() {
        // 模拟取钱
        account.drawMoney(100000);
    }
}
